<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- jquery -->
<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
<!-- bootstrap -->
<link rel="stylesheet" type="text/css"
	th:href="@{/bootstrap/css/bootstrap.min.css}" />
<script type="text/javascript"
	th:src="@{/bootstrap/js/bootstrap.min.js}"></script>


</head>
<style>
</style>
<body>


	<!-- 全部项目 -->
	<div id="uc-project-all-content" class="uc-content-content" th:fragment="frg0"
		xmlns:th="http://www.w3.org/1999/xhtml">
 
		<table id="uc_allPjtTable" class="table table-bordered table-hover">
			<colgroup>
				<col width="200px" />
				<col width="100px" />
				<col width="100px" />
				<col width="200px" />
				<col width="100px" />
				<col width="100" />
			 
			</colgroup>
			<thead>
				<tr>
					<th>项目信息</th>
					<th>发起日期</th>
					<th>结束日期</th>
					<th>筹资进度</th>
					<th>项目状态</th>
		 		 
				</tr>
			</thead>
			<tbody>
				<tr th:each="pro : ${projects}">
					<th>
						<div>
							<a class="btn btn-link" th:text="${pro.name}"
								th:href="'/detail/showDetail?projID='+${pro.id}"></a>
						</div>
					</th>
					<th>
						<div>
							<span th:text="${pro.createTime}"></span>
						</div>
					</th>
					<th>
						<div>
							<span th:text="${pro.endTime}"></span>
						</div>
					</th>

					<th>
						<div>
							<p th:text="'目标金额：'+${pro.targetMoney}+'￥'"></p>

							<div th:with="percent=${pro.currentMoney}/${pro.targetMoney}">
								<progress th:value="${pro.currentMoney}"
									th:max="${pro.targetMoney}"></progress>
								<span
									th:text="${#numbers.formatDecimal(percent * 100, 1, 1)}+'%'">
								</span>
							</div>
						</div>
					</th>
					<th>
						<p class = "btn btn-info " th:text="${pro.stateName}" ></p>
					</th>
 			 
				</tr>
			</tbody>
		</table>
	</div>
	<!-- 未完成项目 -->
		<div id="uc-project-unfin-content" class="uc-content-content" th:fragment="frg1"
		xmlns:th="http://www.w3.org/1999/xhtml" >
 
		<table id="uc_unfinPjtTable" class="table table-bordered table-hover">
			<colgroup>
				<col width="150px" />
				<col width="100px" />
				<col width="100px" />
				<col width="200px" />
				<col width="100px" />
				<col width="100" />
			</colgroup>
			<thead>
				<tr>
					<th>项目信息</th>
					<th>发起日期</th>
					<th>结束日期</th>
					<th>筹资进度</th>
					<th>项目状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr th:each="pro : ${projects}" th:if="${pro.state} != 6" id = "pro.id">
					<th>
						<div>
							<a class="btn btn-link" th:text="${pro.name}"
								th:href="'/detail/showDetail/projID='+${pro.id}"></a>
						</div>
					</th>
					<th>
						<div>
							<span th:text="${pro.createTime}"></span>
						</div>
					</th>
					<th>
						<div>
							<span th:text="${pro.endTime}"></span>
						</div>
					</th>

					<th>
						<div>
							<p th:text="'目标金额：'+${pro.targetMoney}+'￥'"></p>
							<div th:with="percent=${pro.currentMoney}/${pro.targetMoney}">
								<progress th:value="${pro.currentMoney}"
									th:max="${pro.targetMoney}"></progress>
								<span
									th:text="${#numbers.formatDecimal(percent * 100, 1, 1)}+'%'">
								</span>
							</div>
						</div>
					</th>
					<th>
						<p class = "btn btn-info " th:text="${pro.stateName}" ></p>
					</th>
 			
 				
 				<th align="center" th:if="${pro.state} == 0">
 				<button class = "btn btn-success" id = "updateProBtn" th:onclick="'updateProject('+${pro.id}+',1)'">提交项目</button>
 				</th>
 				
 				<th align="center" th:if="${pro.state} == 1">
 				<button class = "btn btn-danger" id = "updateProBtn" th:onclick="''">删除项目</button>
 				</th>
 				
 				<th align="center" th:if="${pro.state} == 20">
 				<button class = "btn btn-info" id = "updateProBtn" th:onclick="'updateProject('+${pro.id}+',1)'">修改项目</button>
 				</th>
 				
 				<th align="center" th:if="${pro.state} == 22">
 				<button class = "btn btn-danger" id = "updateProBtn" th:onclick="''">撤销申请</button>
 				</th>
 				
 				<th align="center" th:if="${pro.state} == 21">
 				<button class = "btn btn-success" id = "updateProBtn" th:onclick="'updateProject('+${pro.id}+',22)'">申请延期</button>
 				</th>
 				
 				<th align="center" th:if="${pro.state} == 99">
 				<button class = "btn btn-info" id = "updateProBtn" th:onclick="'updateProject('+${pro.id}+',80)'">申请解锁</button>
 				</th>
 				
 				<th align="center" th:if="${pro.state} == 30">
 				<button class = "btn btn-danger" id = "updateProBtn" th:onclick="''">筹款失败</button>
 				</th>
 					
 				<th align="center" th:if="${pro.state} == 31">
 				<button class = "btn btn-success" id = "updateProBtn" th:onclick="'updateProject('+${pro.id}+',41)'">申请提款</button>
 				 
 				</th>
 				
 				<th align="center" th:if="${pro.state} == 5">
  				<button class = "btn btn-success" id = "updateProBtn" th:onclick="'updateProject('+${pro.id}+',6)'">确认回报</button>
 				</th>
 				
 		 
				</tr>
			</tbody>
		</table>
	</div>

	<!-- 已完成项目 -->
	<div id="uc-project-fin-content" class="uc-content-account"  th:fragment="frg2"
		xmlns:th="http://www.w3.org/1999/xhtml">
		<table id="uc_finPjtTable" class="table table-bordered table-hover">
			<colgroup>
				<col width="200px" />
				<col width="100px" />
				<col width="100px" />
				<col width="200px" />
				<col width="100px" />
				<col width="100" />
			</colgroup>
			<thead>
				<tr>
					<th>项目信息</th>
					<th>发起日期</th>
					<th>结束日期</th>
					<th>筹资进度</th>
					<th>项目状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr th:each="pro : ${projects}" th:if="${pro.state} == 6">
					<th>
						<div>
							<a class="btn btn-link" th:text="${pro.name}"
								th:href="'/detail/showDetail?projID='+${pro.id}"></a>
						</div>
					</th>
					<th>
						<div>
							<span th:text="${pro.createTime}"></span>
						</div>
					</th>
					<th>
						<div>
							<span th:text="${pro.endTime}"></span>
						</div>
					</th>

					<th>
						<div>
							<p th:text="'目标金额：'+${pro.targetMoney}+'￥'"></p>
							<div th:with="percent=${pro.currentMoney}/${pro.targetMoney}">
								<progress th:value="${pro.currentMoney}"
									th:max="${pro.targetMoney}"></progress>
								<span
									th:text="${#numbers.formatDecimal(percent * 100, 0, 1)}+'%'">
								</span>
							</div>
						</div>
					</th>
					<th>
					 
						<p th:text="'结束'" ></p>
 
					</th>
				
					<th align="center"  ><a th:href="''">已关闭</a></th>
				</tr>
			</tbody>
		</table>
	</div>




</body>
</html>